<?php /*a:2:{s:52:"/www/wwwroot/mall/public/template/user/vip/take.html";i:1626512875;s:64:"/www/wwwroot/mall/public/template/user/../index/public/mlay.html";i:1624501447;}*/ ?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="x-ua-compatible" content="ie=edge">
		<title>我的提现</title>
		<meta name="keywords" content="<?php echo config('app.web_site_keywords'); ?>">
		<meta name="description" content="<?php echo config('app.web_site_description'); ?>">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, shrink-to-fit=no, user-scalable=no">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		
		
		<!-- Icons -->
		<link rel="icon" href="/static/images/favicon.ico">
		<!-- END Icons -->
		
		<!-- Stylesheets -->
		<link rel="stylesheet" href="/static/libs/weui/css/weui.min.css">
		<link rel="stylesheet" href="/static/libs/weui/css/common.css?v=<?php echo config('app.asset_version'); ?>">
		<link rel="stylesheet" href="/static/css/font/iconfont.css?v=<?php echo config('app.asset_version'); ?>">
		<!-- END Stylesheets -->
		
<style>
	html {
		height: 100%;
	}

	body {
		height: 100%;
	}

	#app {
		height: 100%;
	}

	.take {
		font-size: 0.7rem;
		border-radius: 1rem;
		margin: 0.5rem 0.5rem;
		background: #fff;
	}

	.take p {
		padding: 0.5rem 0rem;
		margin: 0 0.5rem;
		/* background: #fff; */
		border-bottom: 1px solid #e7e7e7;
	}

	.take p input {
		padding-left: 0.5rem;
	}

	.money {
		font-size: 0.7rem;
		/* margin: 0 1rem; */
		padding: 0.5rem 1rem;
	}

	.money_box {
		padding: 0.5rem 0.5rem;
		margin: 0.5rem 0;
		background: #fff;
		align-items: center;
		border-radius: 0.5rem;
		box-shadow: 0.2rem 0.2rem 0.2rem rgba(0,0,0,0.1);
	}

	.undo {
		background: #ffaa00;
		border-radius: 1.5rem;
		width: 2.5rem;
		height: 1rem;
		text-align: center;
		color: #fff;
	}
	.undo2{
		background: #ccc;
	}

	.submit {
		background: #ffaa00;
		color: #fff;
		margin-top: 0.5rem;
		border-radius: 30px;
		padding: 0.4rem 0.5rem;
		width: 100%;
		text-align: center;
	}
</style>
<link rel="stylesheet" href="/template/static/css/public.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.12/lib/index.css" />

	</head>
	<body id="<?php echo htmlentities(strtolower(app('request')->app())); ?>-<?php echo htmlentities(strtolower(app('request')->controller())); ?>-<?php echo htmlentities(strtolower(app('request')->action())); ?>">
		<!-- Page Container -->
		<div class="page" id="main">
			

			
<div id="app">
	<div id="">
		<div style="font-size: 0.7rem;margin: 1rem 1rem 0.5rem 1rem;color: #939393;" class="">
			申请提现
		</div>
		<div class="take">
			<p>开户行<input v-model="bank" type="text" placeholder="开户行" value="" /></p>
			<p>银行卡号<input v-model="card" type="text" placeholder="请输入会员实名下的银行卡号" value="" /></p>
			<p>提现金额<input v-model="money" type="text" placeholder="请输入提现金额" value="" /></p>
			<div style="font-size: 0.7rem;padding-left: 0.5rem;color: #9d9d9d;" class="">
				可提现金额￥<?php echo htmlentities($vip['money_take']); ?>
			</div>
			<p>备注<input v-model="remark" type="text" placeholder="备注" value="" /></p>
		</div>
	</div>
	<div style="font-size: 0.7rem;padding: 0 1rem;" class="flex ju_sb">
		<span @click="submit" class="submit">提交申请</span>
		<!-- <span @click="cancel_the_submission" style="background: red;border-radius: 30px;padding: 0.2rem 0.5rem;">撤销申请</span> -->
	</div>
	<div class="money">
		<div style="font-size: 0.7rem;margin-top: 1rem;color: #939393;" class="">
			提现记录
		</div>
		<div class="money_box flex ju_sb" v-for="(item,index) in Data" v-cloak>
			<div class="">
				<div class="">
					<span>{{item.bank}} </span>
					<span>提现￥:{{item.money_take}}</span>
				</div>
				<div class="">
					<span :style="{color:(item.status<1?conFontColor:'#008800')}">{{item.status_txt}}</span>
					<span>{{item.time}}</span>
				</div>
			</div>
			<span v-if="item.status<1" class="undo" @click="undo(item)">撤销</span>
			<span v-else class="undo undo2" @click="undo_two">撤销</span>
		</div>
		<div v-if="this.Data.length==0" class="tc">
			没有提现记录哦
		</div>
	</div>
	<!-- 	<div style="width: 5rem;" v-for="(item,index) in images" @click="click(index,item)" id="">
		<img :src="item">
	</div> -->
</div>

		</div>
		<!-- END Page Container -->
		<!-- FOOT -->
		
		
		<!-- Footer -->
		<!-- 工具栏 -->
		<div class="footer"></div>
		<?php if(!(empty($nav['main_nav']) || (($nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator ) && $nav['main_nav']->isEmpty()))): ?>
		<nav class="bar-tab weui-flex">
			<?php if(is_array($nav['main_nav']) || $nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator): $i = 0; $__LIST__ = $nav['main_nav'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?>
			<a class="tab-item weui-flex__item<?php if(isset($active) && $active == $menu['rel']): ?> active<?php endif; ?>" href="<?php echo htmlentities($menu['url']); ?>">
				<span class="icoimg <?php echo htmlentities($menu['css']); if(isset($active) && $active == $menu['rel']): ?>-full<?php endif; ?>"></span>
				<span class="tab-label"><?php echo htmlentities($menu['title']); ?></span>
			</a>
			<?php endforeach; endif; else: echo "" ;endif; ?>
		</nav>
		<?php endif; ?>
		<!-- Footer -->
		

		
		<ul id="Fixed">
			<li id="goTop" class="ico ico-up hidden" title="去顶部"></li>
		</ul>
		
		<!-- END FOOT-->
		<div class="hidden">
			
			<?php echo config('app.web_site_statistics'); ?>
			
		</div>
		<!--js -->
		<script src="/static/libs/weui/js/jquery.min.js"></script>
		<script src="/static/libs/weui/js/weui.min.js"></script>
		<script src="/static/libs/weui/js/common.js?<?php echo config('app.asset_version'); ?>"></script>
		
		<?php if(!(empty($jssdk) || (($jssdk instanceof \think\Collection || $jssdk instanceof \think\Paginator ) && $jssdk->isEmpty()))): ?>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
		<script>
			wx.config({
				debug: false,
				appId: '<?php echo htmlentities($jssdk['appid']); ?>',
				timestamp: '<?php echo htmlentities($jssdk['timestamp']); ?>',
				nonceStr: '<?php echo htmlentities($jssdk['noncestr']); ?>',
				signature: '<?php echo htmlentities($jssdk['signature']); ?>',
				jsApiList: [
					'updateAppMessageShareData',
					'updateTimelineShareData',
					'hideMenuItems',
					'showMenuItems',
					'closeWindow',
				],
				openTagList: ['wx-open-launch-weapp']
			});
			wx.ready(function() {
				wx.updateAppMessageShareData({
					title: "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					desc: "<?php echo htmlentities((isset($share['desc']) && ($share['desc'] !== '')?$share['desc']:config('app.web_site_slogan'))); ?>", // 分享描述
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				wx.updateTimelineShareData({
					title:  "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				<?php if(!(empty($share['hide']) || (($share['hide'] instanceof \think\Collection || $share['hide'] instanceof \think\Paginator ) && $share['hide']->isEmpty()))): ?>
				wx.hideMenuItems({
					menuList: ['menuItem:copyUrl', 'menuItem:originPage', 'menuItem:readMode', 'menuItem:openWithQQBrowser',
						'menuItem:openWithSafari', 'menuItem:share:email', 'menuItem:favorite', 'menuItem:share:qq',
						'menuItem:share:weiboApp', 'menuItem:favorite', 'menuItem:share:QZone'] // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
				});
				<?php endif; ?>
				wx.showMenuItems({
					menuList: ["menuItem:profile", "menuItem:addContact", ] // 要显示的菜单项，所有menu项见附录3
				});
			});
		</script>
		<?php endif; ?>
		
		
<!-- 引入vue.js文件使用vue开发 -->
<script src="/template/static/js/public/vue.min.js" type="text/javascript" charset="utf-8"></script>
<!-- vant -->
<script src="/template/static/js/public/vant-2.12.min.js" type="text/javascript" charset="utf-8"></script>
<script>
	Vue.use(vant.ImagePreview);
	var vm = new Vue({
		el: "#app",
		data() {
			return {
				conFontColor:'#ffaa00',
				show: false,
				bank: "<?php echo htmlentities($vip['bank']); ?>",
				card: "<?php echo htmlentities($vip['card']); ?>",
				money: '',
				remark: '',
				index: '',
				Data: [],
				images: [
					'https://img01.yzcdn.cn/vant/apple-1.jpg',
					'https://img01.yzcdn.cn/vant/apple-2.jpg',
				],
				vip_money: <?php echo htmlentities($vip['money_take']); ?>,

			}
		},
		//计算属性	
		computed: {},
		//监听属性
		watch: {},
		//钩子函数	
		created() {
			this.shuju();
		},
		mounted() {

		},
		methods: {
			submit() {
				let that = this
				if (that.bank == ''){
					weui.topTips('开户行不能为空');
					return false;
				}
				if (that.card == ''){
					weui.topTips('银行卡号不能为空');
					return false;
				}
				if (that.money == ''){
					weui.topTips('请输入提现金额');
					return false;
				}
				if (that.money > that.vip_money){
					weui.topTips('提现金额不能超过可提现金额');
					return false;
				}
				if (that.money < 100){
					weui.topTips('提现金额不能低于100元');
					return false;
				}
				$.post("", {
					bank: that.bank,
					card: that.card,
					money: that.money,
					remark: that.remark,
					apply: 'add',
				}, function(res) {
					if (res.code == 1) {
						vant.Toast.success(res.msg);
						that.shuju()
					} else {
						weui.topTips(res.msg);
					}
				});
			},
			shuju() {
				$.post("", {

				}, function(res) {
					console.log(res);
					vm.Data = res.data.items
				});
			},
			undo(e) {
				console.log(e);
				let that = this
				vant.Dialog.confirm({
				  title: '温馨提示',
				  message: '确定要撤销吗?',
				})
				  .then(() => {
				    // on confirm
					$.post("", {
						apply: 'cancel',
						id: e.id
					}, function(res) {
						console.log(res);
						if(res.code==1) {
							vant.Toast.success(res.msg);
							that.shuju()
						} else {
							vant.Toast.fail(res.msg);
						}
					});
				  })
				  .catch(() => {
				    // on cancel
				  });		
			},
			undo_two() {
				vant.Toast.fail('无法撤销');
			},
			cancel_the_submission() {
				console.log('撤销');
			},
			click(index, item) {
				vant.ImagePreview({
					images: this.images,
					showIndex: true,
					loop: true, //是否循环播放
					startPosition: index
				})
			},
			onChange(index) {
				this.index = index;
				console.log('000', index);
			},
		}
	})
</script>

	</body>
</html>
